﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using myWindowsMediaPlayer.Model;

namespace myWindowsMediaPlayer.ViewModel
{
    class musicViewModel : viewModelBase, interfaceMediaViewModel
    {
        private readonly musicModel music;

        public musicViewModel(musicModel music)
        {
            if (music != null)
                this.music = music;
        }

        public musicModel Music
        {
            get { return this.music; }
        }

        public string ArtistName
        {
            get { return this.music.Artist.Name; }
            set { this.music.Artist.Name = value; }
        }

        public string AlbumName
        {
            get { return this.music.Album.Name; }
            set { this.music.Album.Name = value; }
        }

        public string AlbumPath
        {
            get { return this.music.Album.Path; }
            set { this.music.Album.Path = value; }
        }
        public string Name
        {
            get { return this.music.Track.Name; }
            set { this.music.Track.Name = value; }
        }

        public string Path
        {
            get { return this.music.Track.Path; }
            set { this.music.Track.Path = value; }
        }

        public TimeSpan Duration
        {
            get { return this.music.Track.Duration; }
        }
    }
}
